﻿using System;
using System.Runtime.CompilerServices;
using System.Collections.Generic;

namespace Quicklight.Mobile.Cordova.File {

   [IgnoreNamespace]
   public abstract class Entry {
      [ScriptName("isFile")]
      public bool IsFile;
      [ScriptName("isDirectory")]
      public bool IsDirectory;
      [ScriptName("name")]
      public string Name;
      [ScriptName("fullPath")]
      public string FullPath;

      [ScriptName("getMetadata")]
      public abstract void GetMetadata(MetadataSuccessCallback successCallback, FileErrorCallback errorCallback);

      [ScriptName("setMetadata")]
      public abstract void SetMetadata(VoidCallback successCallback, VoidCallback errorCallback, Dictionary<string, string> metadata);

      [ScriptName("toURL")]
      public abstract string ToURL();

      /// <todo>Confirm type of successCallback. Documention is inconsistent</todo>
      [ScriptName("remove")]
      public abstract void Remove(VoidCallback successCallback, FileErrorCallback errorCallback);

      [ScriptName("getParent")]
      public abstract void GetParent(DirectoryEntrySuccessCallback successCallback, FileErrorCallback errorCallback);

   }

}
